<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/page/base.jsp"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="d" uri="/doone-comm-ui-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<link type="text/css" href="<%=path%>/manage/css/layout.css"
	rel="stylesheet" />
<link type="text/css" href="<%=path%>/manage/css/new_style.css"
	rel="stylesheet" />
<link type="text/css"
	href="<%=path%>/manage/page/user/css/users_style.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>/manage/css/Tooltip.css" />
<link type="text/css"
	href="<%=path%>/manage/css/jquery.dropdownchecklist.css"
	rel="stylesheet" />
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/jquery_form.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/easyTooltip.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.wysiwyg.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/hoverIntent.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/superfish.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/custom.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/Tooltip.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/errorTip.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.validate.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.validate.methods.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.validate.defaults.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.metadata.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.dropdownchecklist.core.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.dropdownchecklist.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery-ui-1.8.11.custom.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/jquery.blockUI.js"></script>
<script type="text/javascript"
	src="<%=path%>/manage/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path%>/manage/js/user/user.js"></script>

<style type="text/css">
.searchField li span {
	text-align: left;
}

.addContent input.text {
	width: 267px;
}
</style>
<script type="text/javascript">
	var path = "${pageContext.request.contextPath}";
</script>
</head>
<body>
	<div>
		<p class="sitemap">当前位置：用户信息管理 > 用户管理</p>
		<div>
			<!-- Tabs -->
			<div id="tabs">
				<ul>
					<li><a href="#tabs-1">用户列表</a></li>
				</ul>
				<div class="bottom_line" style="height: 40px">
					<span class="toolbar_right"> <a class="btn_cog"
						href="<%=path%>/clientuser/getUserConfigInit.action">注册信息配置</a>| <a
						class="btn_level"
						href="<%=path%>/clientuser/getUserLevelInit.action">用户等级配置</a>| <a
						class="btn_level"
						href="<%=path%>/clientuser/getPointConfigInit.action">积分规则配置</a>
					</span>
				</div>
				<!-- 检索 -->
				<div>
					<form name="searchForm" id="searchForm" method="post"
						action="<%=path%>/clientuser/getClientNewUserPage.action">
						<ul class="searchField">
							<li><span>用户名称:</span> <input type="text"
								name="condition.userName" value="${condition.userName }"
								id="userName"></li>
							<li><span>用户分组:</span> <select id="userType"
								name="condition.userType">
									<option value="">-全部-</option>
									<option value="NORMAL"
										<c:if test="${condition.userType eq 'NORMAL' }">selected="selected"</c:if>>
										-会员-</option>
									<option value="NOT_VERIF"
										<c:if test="${condition.userType eq 'NOT_VERIF' }">selected="selected"</c:if>>
										-未验证-</option>
									<option value="ANON"
										<c:if test="${condition.userType eq 'ANON' }">selected="selected"</c:if>>
										-匿名-</option>
							</select></li>
							<li><span>活跃时间:</span> <input type="text"
								id="update_activeStartTime" readonly="readonly"
								name="condition.lastActivityDtStart"
								onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(update_activeEndTime)}',onpicked:function(){$dp.$('update_activeEndTime').focus();}})"
								style="margin: auto -3px;"
								value="${condition.lastActivityDtStart }" /> 一 <input
								id="update_activeEndTime" name="condition.lastActivityDtEnd"
								readonly="readonly"
								onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(update_activeStartTime,{m:1});}'})"
								style="margin: auto -3px;"
								value='${condition.lastActivityDtEnd }' /></li>
							<li><span>用户机型:</span> <select name="condition.deviceModel"
								multiple="multiple">
									<option value="ALL"
										<c:forEach var="choseModel" items="${condition.deviceModel }" >
										 <c:if test="${choseModel eq 'ALL'}">selected="true"</c:if>
										</c:forEach>>-全部-</option>
									<c:forEach var="model" items="${deviceModels }">
										<option value="${model}"
											<c:forEach var="choseModel" items="${condition.deviceModel }" >
										 <c:if test="${choseModel eq model}">selected="true"</c:if>
										</c:forEach>>${model}</option>
									</c:forEach>
							</select></li>
							<li style="width: 50px"><input type="submit" id="searchBtn"
								value="检索"></li>
							<li style="width: 50px"><input id="restBtn" type="button"
								value="重置"></li>
						</ul>
						<div class="clear"></div>
					</form>
				</div>
				<!-- 检索 END-->
				<!-- First tab -->
				<table cellspacing="0" cellpadding="0" border="0" class="fullwidth">
					<thead>
						<tr>
							<td width="5%">全选</td>
							<td width="20%">用户</td>
							<td width="10%">社交账号</td>
							<td width="20%">用户设备</td>
							<td width="30%">活跃度</td>
							<td width="10%">活跃时间</td>
							<td width="5%">操作</td>
						</tr>
					</thead>
					<tbody>
						<c:forEach var="user" items="${users }">
							<tr class="odd">
								<td><input name="ckUserBox" type="checkbox"
									value="${user.ID }"></td>
								<c:if test="${user.USER_TYPE eq 'ANON' }">
									<td>匿名用户</td>
									<td></td>
								</c:if>
								<c:if test="${user.USER_TYPE ne 'ANON' }">
									<td>
										<div style="float: left;">
											<c:if test="${user.AVATAR eq null }">
												<img src="<%=path%>/manage/images/avatar.gif" />
											</c:if>
											<c:if test="${user.AVATAR ne null }">
												<img src="${user.AVATAR }" width="54" class="portrait">
											</c:if>
										</div>
										<div
											style="float: left; height: 50px; vertical-align: middle;">
											<c:if test="${user.PROVIDER eq 'PHONE' }">
												<p style="line-height: 1px; margin-top: 15px">用户名:
													${user.USER_NAME }</p>
												<c:if test="${user.USER_AILAS ne user.USER_NAME}">
													<p style="line-height: 1px;">昵称： ${user.USER_AILAS }</p>
												</c:if>
											</c:if>
										</div>
										<div style="clear: both;"></div>
									</td>
									<td><c:forEach var="link" items="${user.LINKS }">
											<c:if test="${link.PROVIDER eq 'T_SINA' }">
												<div class="icon_weibo_xl">${link.USER_ALIAS }</div>
											</c:if>
											<c:if test="${link.PROVIDER eq 'T_TENCENT' }">
												<div class="icon_weibo_tx">${link.USER_ALIAS }</div>
											</c:if>
										</c:forEach></td>
								</c:if>
								<td><c:forEach var="device" items="${user.DEVICES }">
										   ${ device.DEVICE_MODEL}
									    </c:forEach></td>
								<td><label class="activity_num"> 主题 <a
										href="javascript:;">${user.COMMENTS_ADD_COUNT eq
											null?0:user.COMMENTS_ADD_COUNT } </a>
								</label> | <label class="activity_num"> 回复 <a
										href="javascript:;"> ${user.REPLY_ADD_COUNT eq
											null?0:user.REPLY_ADD_COUNT }</a>
								</label> | <label class="activity_num"> 积分 <a
										href="javascript:;">${user.RANK_POINT} </a>
								</label> | <label class="activity_num"> 订单 <a
										href="javascript:;"> ${user.EC_PRODUCT_ADD_COUNT eq
											null?0:user.EC_PRODUCT_ADD_COUNT }</a>
								</label> | <label class="activity_num"> 预订 <a
										href="javascript:;"> ${user.EC_ORDER_ADD_COUNT eq
											null?0:user.EC_ORDER_ADD_COUNT }</a>
								</label>| <label class="activity_num"> 收藏 <a href="javascript:;">${user.ACTIVITIES_FAV_COUNT+user.EC_FAVORITE_COUNT
											}</a>
								</label></td>
								<td><fmt:formatDate value="${user.LAST_ACTIVITY_DT}"
										pattern="yyyy-MM-dd hh:mm:ss" /></td>
								<td><a class="icon icon_detail" title="详细"
									href="<%=path%>/clientuser/getClientNewUserDetail.action?userId=${user.ID}"></a>
								</td>
							</tr>
						</c:forEach>
					</tbody>
					</tbody>
				</table>
				<!-- End of Tabs -->
			</div>
			<!-- 全选+发消息+移动区 开始-->
			<input type="checkbox" value="" id="allPicker"> 全选

		</div>
		<!-- 全选+发消息+移动区 结束-->
		<!-- 分页标签开始 -->
		<div align="right" style="float: right;">
			<d:page id="page" template="details" skin="gray">
			</d:page>
		</div>
		<!-- 分页标签结束 -->
		<hr />
	</div>
</body>
</html>
